import http from "./http";

// 测试：获取list的数据  get接口
export function getList(params:any){
    //params {id:10}
    // http.get(url地址,{params:{参数},headers:{}})
   return http.get("/list",{params})
}


// 测试：获取info的数据  post接口
export function chatInterface(data: any) {
    console.log('data',data);
    return http.post('/api/chat', {
        messages: data
    }, {
        headers: {
            'Content-Type': 'application/json'
        }
    });
}

// 对话历史记录保存
export function addHistory(data:any){
    console.log('data',data);
    return http.post("/jwh/historical",data)
}

export async function getUserInfo (e:any){
    return await http.post("/jwh/getHistorical",{id:e})
}

//注意登录`
// 测试：获取info的数据  post接口
export function getLogin(data:any){
    // http.post(url地址,{参数},{headers})
    return http.post("/loginS",{data})
}
export function getSvg(data:any){
    // http.post(url地址,{参数},{headers})
    return http.post("/svgCode",data)
}
export function getUpdateId(data:any){
    return http.post("/updateId",data)
}
export function getloginREN(data:any){
    return http.post("/loginREN",data)
}
export function getFaceLogin(data:any){
    return http.post("/faceLogin",data)
}
export function getAddLogin(data:any){
    return http.post("/addLogin",data)
}

export function getNameUpdatef(data:any){
    return http.post("/nameUpdatef",data)
}